package net.FamilyTree.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper = false)
public class People implements Serializable {

    // 使用@TableId注解标识id字段为主键，并指定主键生成策略为自动增长
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    // parentId字段，表示父级人物的id
    private Integer parentId;

    // name字段，表示人物的姓名
    private String name;

    // sex字段，表示人物的性别
    private String sex;

    // image字段，表示人物的图片路径
    private String image;

    private String brithday;
    private String deadday;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date updatetime;
    private Integer userid;

    @TableLogic(value = "0",delval = "1")
    private Integer delflag;

}
